package test;

import java.util.Random;


public class NGuessNumberTest {

  public static void main(String[] args){

    Random ran = new Random();
    StringBuffer sb = new StringBuffer();
    int i = 0;
    while(i < 4){
      int t = ran.nextInt(9);
      if(sb.indexOf(String.valueOf(t)) == -1){
        sb.append(t);
        i++;
      }
    }
    System.out.println(sb.toString());

    
  }
}
